package com.jyy.server.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import com.jyy.server.mapper.NationMapper;
import com.jyy.server.pojo.Nation;
import com.jyy.server.service.INationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author rica
 * @since 2021-09-21
 */
@Service
public class NationServiceImpl extends ServiceImpl<NationMapper, Nation> implements INationService {

    @Autowired
    private NationMapper nationMapper;

    @Override
    public Nation getNationByName(String name) {
        return nationMapper.selectOne(new QueryWrapper<Nation>().eq("name",name));
    }
}
